
'''
    作业02
'''
import time
def calculateRunTime(fn):
    def countTime(*args,**kw):
        start_time = time.time()
        fn(*args,**kw)
        end_time = time.time()
        print('耗时:{:.4f}s'.format(end_time - start_time))
        return fn
    return countTime

@calculateRunTime
def test1():
    for i in range(100000):
        i = i +1

@calculateRunTime
def test2():
    for i in range(10000000):
        i = i +1

if __name__ == "__main__":
    test1()
    test2()